
package cn.webrx;

public class op1 {
    public static void main(String[] args) {
        //+ - * / % ++ --
        System.out.println(10 + 20);//30
        System.out.println(10 * 20);//200
        System.out.println(10 / 20);// 整商0
        System.out.println(10 / 20.0);// 0.5
        System.out.println(7 / 2); //整商3

        System.out.println(10 % 20);//10
        System.out.println(5%2);//余数1
        System.out.println(5%5);//余数0
        System.out.println(Math.floorMod(5,5));//余数0

        int a = 10;
        System.out.println(a++); //后运算，先用再运算
        System.out.println(++a);//前运算，先运算，再用
        System.out.println(--a);
        System.out.println(a--);
        System.out.println(a);
    }
}
